<%--                                                                       --%>
<%-- Copyright (c) 2001-2004 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ page language="java" %>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> 
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> 
<%@ taglib uri="/WEB-INF/bv-html.tld" prefix="bvhtml" %>

<jsp:useBean id="micrositeOverviewView" scope="request" type="com.broadvision.web.util.ViewDynaBean"/> 
<jsp:useBean id="micrositeNaviInfoView" scope="request" type="com.broadvision.web.util.ViewDynaBean"/> 

<%-- 
  //
  // Find out the full path of microsite url.
  //
  String urlFriendlyName = (String)micrositeOverviewView.getMap().get("urlFriendlyName");
  String urlPath = ""; 
  if ( urlFriendlyName!= null && urlFriendlyName.length() > 0 ) { 
    String serverName = request.getServerName();
    String serverProtocol = request.getProtocol();
    int serverPort = request.getServerPort();
    int index = serverProtocol.indexOf("/");
    serverProtocol = serverProtocol.substring(0,index);
    //
    // We hardcode the URL prefix in the web server's URL Forwarding to "/microsites/". 
    // If customers change the URL prefix, they can update the next line. 
    //
    urlPath = serverProtocol + "://" + serverName + ":" + serverPort + "/microsites/" + urlFriendlyName;
  }
--%>

<!-- Zone 5 starts here.  -->
      
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" 
       summary="microsite overview">
  <tr>
    <td valign="top">
    
    <!--start microsite logo and name here-->
      <div class="pageTitle">
        <%@ include file="/cs/microsite/micrositeNaviInfo.jsp" %> 
      </div> 
    <!--end microsite logo and name here-->
    
    <!--start title bar here-->
    <div class="blockTitle">
      
      <span class="left">
        <bean:write name="micrositeOverviewView" property="pageTitle" />        
      </span>
      
      <span class="right">
        <logic:equal name="micrositeOverviewView" property="isOwner" value="true" >
        <html:form action="/cs/micrositeEdit.do">
          <bvhtml:hiddenList name="micrositeNaviInfoView" property="urlParams" scope="request"/>
          <html:submit styleClass="titleButton" property="editBtn" titleKey="button.edit">
            <bean:message key="button.edit"/>
          </html:submit>
        </html:form>       
        </logic:equal>
      </span>
    </div>  
    <!--end title bar here-->
    
    <div class="blockWrap">
    
    <!--start microsite overview table -->    
    <table class="labelForm" width="100%" border="0" cellspacing="0" 
           cellpadding="0" summary="microsite overview">
      <tr> 
        <td nowrap width="20%" class="label">
          <bean:message key="cs.name"/>:
        </td>
        <td nowrap width="80%" class="labelField">
          <bean:write name="micrositeNaviInfoView" property="micrositeName" />
        </td>
      <tr> 
        <td nowrap width="20%" class="label"> 
          <bean:message key="cs.description"/>:
        </td>
        <td nowrap width="80%" class="labelField">
          <bean:write name="micrositeOverviewView" property="description" />
        </td>
      </tr>

      <tr> 
        <td nowrap width="20%" class="label">
          <bean:message key="cs.goal"/>:
        </td>
        <td nowrap width="80%" class="labelField">
          <bean:write name="micrositeOverviewView" property="goal" />&nbsp;
        </td>
      </tr>

      
    </table>
    </div>
    
    
    <%-- show list of phases if there is any --%>

    <logic:equal name="micrositeNaviInfoView" property="micrositeTemplatePhaseFlag" value="true">
      <div class="pageSubtitle">
        <span class="left">
          <bean:message key="cs.phases"/>
        </span>
        <span class="right">&nbsp;</span>
      </div>  
      <div class="blockWrap">    
      <!-- Start phase list here -->
      <table class="dataTable" border="0" cellspacing="1" cellpadding="2" 
             summary="Phase list table" width="100%">
        <tr class="listHeader"> 
          <th align="center" nowrap id="currrent" align="center"><bean:message key="cs.current"/></th>
          <th id="name" align="left"><bean:message key="cs.name"/></th>
          <th id="description" align="left"><bean:message key="cs.description"/></th>
          <th id="goal" align="left"><bean:message key="cs.goal"/></th>
        </tr>
        <% long currentPhaseId = -1;
           if (micrositeOverviewView.get("currentPhaseId") != null) {
             currentPhaseId = ((Long)micrositeOverviewView.get("currentPhaseId")).longValue();
           }
        %>
        <logic:iterate id="onePhase" name="micrositeOverviewView" property="phases" type="com.broadvision.web.util.ViewDynaBean" indexId="index">
          <tr class='<%=index.intValue() % 2 == 0 ? "listEven" : "listOdd"%>'>
            <td headers="current" align="center">
              <%if (((Long)onePhase.get("id")).longValue() == currentPhaseId) {%>
                <html:img page="/cs/images/icons/cicon_checkmark.gif" width="22" height="18" altKey="cs.current"/>
              <%}%>
              &nbsp;
            </td>
            <td headers="name"><bean:write name="onePhase" property="name" /></td>
            <td headers="description"><bean:write name="onePhase" property="description" />&nbsp;</td>
            <td headers="goal"><bean:write name="onePhase" property="goal" />&nbsp;</td>
          </tr>
        </logic:iterate>
        <!--end phases alteration here-->
      </table>
    </logic:equal> 
    </div>
    
    

    <%-- owners list table --%>
    <div class="pageSubtitle">
      <span class="left">
        <bean:message key="cs.owners"/>
      </span>
    </div>  
    
    <div class="blockWrap">
    <!-- Start List here -->
    <table class="dataTable" border="0" cellspacing="1" cellpadding="2" 
           summary="Owner list table" width="100%">
      <tr class="listHeader"> 
        <th id="name" align="left"><bean:message key="cs.name"/></th>
        <th id="email" align="left"><bean:message key="cs.profile.emailaddress"/></th>
        <th id="phone" align="left"><bean:message key="cs.profile.businessphone"/></th>
      </tr>
      
      <!--start owners iteration here-->
      <logic:iterate id="oneOwner" name="micrositeOverviewView" property="owners" indexId="index">
        <tr class='<%=index.intValue() % 2 == 0 ? "listEven" : "listOdd"%>'>
          <td headers="name"><bean:write name="oneOwner" property="fullName" /></td>
          <td headers="email"><bean:write name="oneOwner" property="email" />&nbsp;</td>
          <td headers="phone"><bean:write name="oneOwner" property="businessPhone" />&nbsp;</td>
        </tr>
      </logic:iterate>
      <!--end owners alteration here-->
    </table>
<!--end main content area here-->

	</div>

    </td>
  </tr>
</table>

<%-- end zone five --%>    

